//
//  CPPaintView.h
//  GLPaintPad
//
//  Created by collegepre on 16/4/20.
//  Copyright © 2016年 collegepre. All rights reserved.
//

#import <UIKit/UIKit.h>

@class CPPaintView;

@protocol CPPaintViewDrawDelegate <NSObject>

@optional
- (void)CPPaintView:(CPPaintView *)paintView drawPoints:(NSArray *)points;

@end

@interface CPPaintView : UIView

// 当前点
@property(nonatomic, readwrite) CGPoint location;

// 上一个点
@property(nonatomic, readwrite) CGPoint previousLocation;
@property (nonatomic, assign) BOOL isErase;

@property (nonatomic, weak) id<CPPaintViewDrawDelegate>  delegate;

- (void)clear;
- (void)setBrushColorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
// 创建一个纹理的图像

@end
